package ar.com.ctrln.view.dashboard.mantenimiento.ticket;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.EventQueue;
import org.zkoss.zk.ui.event.EventQueues;
import org.zkoss.zk.ui.select.SelectorComposer;
import org.zkoss.zk.ui.select.annotation.Listen;
import org.zkoss.zk.ui.select.annotation.VariableResolver;
import org.zkoss.zk.ui.select.annotation.Wire;
import org.zkoss.zk.ui.select.annotation.WireVariable;
import org.zkoss.zul.Button;
import org.zkoss.zul.Div;
import org.zkoss.zul.Footer;
import org.zkoss.zul.Grid;
import org.zkoss.zul.ListModel;
import org.zkoss.zul.ListModelList;
import org.zkoss.zul.Textbox;
import org.zkoss.zul.Window;

import ar.com.ctrln.control.mantenimiento.ticket.ConsultarTicket;
import ar.com.ctrln.persistence.model.ticket.Ticket;
import ar.com.ctrln.persistence.model.ticket.actividad.DetalleActividad;
import ar.com.ctrln.view.ui.comportamientoVentana.AbstractMinimizarVentana;

@SuppressWarnings("unused")
@VariableResolver(org.zkoss.zkplus.spring.DelegatingVariableResolver.class)
public class ComentarioTicketController extends SelectorComposer<Component>{

		
	/**
	 * 
	 */
	private static final long serialVersionUID = 1590843458562617527L;

	@Wire
	private Window wComentarioTicket;
	
	@Wire
	private Div btnGuardarComentario;
	
	@Wire
	private Textbox tbDescripcion;
	
	private EventQueue env = EventQueues.lookup("traerComentario", EventQueues.DESKTOP, true);
		
	@Override
	public void doAfterCompose(Component comp) throws Exception {
		super.doAfterCompose(comp);
	}
		
	@Listen("onClick = #btnGuardarComentario")
    public void guardarComment(Event e) {
		env.publish(new Event("onButtonClick", null,tbDescripcion.getValue()));
		wComentarioTicket.onClose();
    }
}

